<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改达式')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-systemExpression-edit" th:object="${systemExpression}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">名称：</label>
				<div class="col-sm-8">
					<input id="expressionName" name="expressionName" th:field="*{expressionName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">值：</label>
				<div class="col-sm-8">
					<input id="expressionValue" name="expressionValue" th:field="*{expressionValue}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">描述：</label>
				<div class="col-sm-8">
					<input id="expressionDesc" name="expressionDesc" th:field="*{expressionDesc}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">逻辑：</label>
				<div class="col-sm-8">
					<input id="expressionLogical" name="expressionLogical" th:field="*{expressionLogical}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">表达式类型：</label>
				<div class="col-sm-8">
					<div class="input-group" style="width: 100%">
						<select id="expressionFlag" name="expressionFlag" class="form-control m-b" th:with="type=${@dict.getType('expression_flag')}">
							<option value="">请选择</option>
							<option th:each="dict : ${type}" th:selected="(${dict.dictValue} == *{expressionFlag})"  th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
						</select>
					</div>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/systemExpression";
		$("#form-systemExpression-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-systemExpression-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
